package guoanmaker.operator.business.repository;

import java.util.List;

import javax.transaction.Transactional;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import guoanmaker.operator.business.model.OperatorCommonServiceNew;

public interface OperatorCommonServiceNewRepository extends JpaRepository<OperatorCommonServiceNew, String>, JpaSpecificationExecutor<OperatorCommonServiceNew> {
	@Query("select c from OperatorCommonServiceNew c where c.cityCode=:cityCode")
	public List<OperatorCommonServiceNew> selectCommonServiceBycityCode(@Param("cityCode") String cityCode);
	@Modifying
	@Transactional
	@Query("delete from OperatorCommonServiceNew  where cityCode=:cityCode")
	public void deleteCommonServiceBycityCode(@Param("cityCode") String cityCode);
	@Modifying
	@Query(value="delete from t_operator_common_service_new where city_code=: cityCode",nativeQuery = true)
	public void deleteByCityCode(@Param("cityCode") String cityCode);

}
